Running silent installations of iMIS Desktop

Larger organizations may want to run a silent version of the iMIS Installer, where the setup.exe displays no installation pages and requires no manual input to run to completion. You accomplish this by running the setup.exe in a recording mode to create an answer file named setup.iss. Then you can use any automated process of your choosing to run the setup.exe in a silent mode that uses the answer file to specify all the installation details.

For example, a common use of this technique would be to automate the installation or upgrade of iMIS Desktop clients on the workstations of your staff after an update has been applied to your iMIS application server. After you have manually updated your iMIS application server with the latest setup.exe, you would:

1.  Produce an answer file to use for new installations of the iMIS Desktop client by running the latest setup.exe in recording mode on a workstation that has no iMIS Desktop client and performing a Custom installation that installs only the iMIS Desktop Client.

2.  Produce an answer file to use for upgrades of existing iMIS Desktop clients by running the latest setup.exe in recording mode on a workstation that already has an iMIS Desktop client and performing a Custom installation that installs only the iMIS Desktop Client.

3.  You then use the automated process of your choice to run the latest setup.exe silently along with one of these answer files as appropriate on all the workstations in your organization where you want to install or upgrade the iMIS Desktop client.

Caution! Although you can technically use this recording process to create an answer file for any type of iMIS installation you can perform manually, ASI does not recommend silent installations of any server-side component of iMIS and any attempts to do so are at your own risk.

To record an answer file

This process records the configuration used for a run-through of the iMIS Installer to an answer file. You get an option to cancel the process immediately after the answer file has been created, but before the installation actually begins.

1.  Open a Command Prompt window and navigate to the folder where the setup.exe is located.

2.  Enter setup.exe -r to launch the iMIS Installer in recording mode.

3.  Work through all the Installer pages as normal for the type of installation you are recording.

4.  When you get to the point where installation is ready to start, you are prompted whether to stop here or continue with the installation. If all you want is the answer file, you can choose to stop here.

5.  Navigate to C:\Windows and locate the setup.iss file that was created in the previous steps. Copy this file and the setup.exe to a folder with a meaningful name that describes the type of installation this pair will create.

6.  Use a text editor such as Windows Notepad to modify the lines near the end of the answer file that specify your OMNIS licensing information. Look for the following lines and modify the values as appropriate, then save the file.

sOmnisUserName=ADD OMNIS USER NAME HERE

sOmnisCompanyName=ADD OMNIS COMPANY NAME HERE

sOmnisLicenseValue=ADD OMNIS SERIAL NUMBER HERE

This file pair (the setup.exe and its corresponding answer file) can now be used in silent installations.

To run a silent installation using an answer file

1.  Open a Command Prompt window and navigate to the folder where the setup.exe and setup.iss are located. These two files must be in the same folder and there must be only one setup.iss in this folder.

2.  Enter setup.exe -s to launch the iMIS Installer in silent mode.
There is no consistent visible indicator of the status of the installation while it is running. (after all, this is a silent installation). The only way to tell when the installation has finished is either by the absence of setup.exe being listed in the Windows Task Manager, or by looking for the following line to be written to the end of the silent installation log file (setup.log) that is created in the same folder as the setup.exe and setup.iss files.

[ResponseResult]

ResultCode=n

Tips

■    If there appears to be a problem with the result of a silent installation, you can review the following two log files to help troubleshoot the problem:

□    The silent installation log file (setup.log by default) located by default in the same folder as the setup.exe and that was used for the silent installation. This location and file name might be different as described below.

□    The IMISinstall.txt file located in C:\Windows\Temp.

The Troubleshooting section below describes how to use these two files to troubleshoot problems with a silent installation.

■    Although you can manually edit an answer file to produce slightly different variants of the same general silent install, you might get unexpected results in some cases. Editing an answer file for the same general type of installation to change some minor details such as which iMIS database to use is generally easy to do. But choosing entirely different components to install results in substantially different answer file contents, so it's impractical to edit an answer file to add or remove iMIS components. It is a better practice to actually run the iMIS Installer in recording mode to create different types of installations.

■    If you prefer the answer file to be placed in a different location than the default C:\Windows folder, use the -f1 parameter as follows when you run the setup.exe in recording mode. Two examples:

C:\temp\setup.exe -r -f1C:\temp\setup.iss

C:\temp\setup.exe -r -f1"C:\Directory With A Space In It\setup.iss"

Caution! Make sure you have no space between the -f1 parameter and the file path that indicates the target folder for the setup.iss file. Also, the -f1 parameter must use an absolute file path that starts with a drive letter.

■    If you prefer the answer file to have a different name than the default setup.iss, which can be convenient if you want to keep a setup.exe file and several different answer files in the same network folder, you can specify the desired file name in the -f1 parameter when in recording mode. To use that particular answer file when running a silent installation, use the -f1 parameter again to specify which answer file to use during the installation.

An example scenario should make this clear. Assume that the setup.exe file for the new iMIS release is located in a network drive that is mapped to drive letter U: on every workstation on the network. You want to record a new answer file for installing only the iMIS Desktop client from that setup.exe. You would first run the first line shown below on a workstation that does not contain an iMIS Desktop client to record a specially-named answer file for doing silent installs or upgrades of only the iMIS Desktop for this release. Then on each workstation where you want to install or upgrade the iMIS Desktop, you would run the second line.

U:\iMISInstaller\setup.exe -r -f1U:\iMISInstaller\iMISDesktop.iss

U:\iMISInstaller\setup.exe -s -f1U:\iMISInstaller\iMISDesktop.iss

■    If you prefer the silent installation log file to be placed in a different location than the folder that contains the setup.exe file (or to have a different name than the default setup.log), use the -f2 parameter as follows. Make sure you have no space between the -f2 parameter and the file path that indicates the target folder for the log file. For example:

U:\iMISInstaller\setup.exe –s -f1U:\iMISInstaller\iMISDesktop.iss –f2U:\iMISInstaller\Logs\userXdesktop.log

Caution! The -f2 parameter  must use an absolute file path that starts with a drive letter.

Troubleshooting

■    Answer files are specific to the version of the setup.exe that was used to create them. You cannot use answer files that were created from a previous release of iMIS.

■    If a silent installation fails for a new installation of the iMIS Desktop client, it is generally safe to troubleshoot the issue with the answer file and then attempt the silent installation again (although by now you're outside of the automated process and it might be easier to manually run the installer on any workstations that failed the automated silent install).

■    If a silent installation fails for an upgrade of an existing iMIS Desktop client, you should not try to modify the answer file and run the silent installation again, because it's likely by this point that some iMIS Desktop-related files have already been removed from the workstation and you could encounter more errors. Instead, you should manually run the iMIS Installer on workstations that failed a silent upgrade attempt.

■    In any scenario where you record an answer file on one computer and then run a silent installation using that answer file on a different computer, there are potential points of failure due to differences in the configuration of the two machines. Some typical examples are:

□    You record an upgrade of the iMIS Desktop on a computer where it's installed in the default C:\Program Files\ASI\iMIS path, and then you run a silent installation on a target computer where the iMIS Desktop is installed in a different path.

□    The answer file was recorded on a computer that already had an iMIS Desktop, so it's an upgrade installation, but the target computer does not have an iMIS Desktop installed already (a new installation), so it needs more information than what was recorded in the answer file.

□    The target computer does not meet all the system requirements and prerequisites.

In some of these cases, such as the installation path on the target computer being different, you can manually edit the corresponding value in the answer file to achieve a successful result. In other cases, such as an answer file recorded during an upgrade but the target system requires a new installation, you cannot achieve successful results by editing the answer file. Instead, you must record the answer file on a computer that is closely analogous to the target computers on which you plan to run silent installations.

■    When you manually edit an answer file, you should take special care to change only values that are obviously file paths, database connection information, appserver URLs, license values, etc. Modifying other non-obvious values can result in infinite loops within the iMIS installer and other undesirable behavior.

■    It is advisable to test your silent installations on non-production computers that are closely analogous to your production target computers before actually running the silent installations on production computers.

■    The setup.log file contains three sections that are useful for troubleshooting:

□    [InstallShield Silent] identifies the version of InstallShield Silent used in the silent installation. It also identifies the file as a log file.

□    [Application] identifies the installed application's name and version, and the company name.

□    [ResponseResult] contains the result code indicating whether or not the silent installation succeeded. An integer value is assigned to the ResultCode keyname in the [ResponseResult] section. InstallShield places one of the following return values after the ResultCode keyname:

■    0 Success.

■    -1 General error.

■    -2 Invalid mode.

■    -3 Required data not found in the Setup.iss file.

■    -4 Not enough memory available.

■    -5 File does not exist.

■    -6 Cannot write to the response file.

■    -7 Unable to write to the log file.

■    -8 Invalid path to the InstallShield Silent response file.

■    -9 Not a valid list type (string or number).

■    -10 Data type is invalid.

■    -11 Unknown error during setup.

■    -12 Dialogs are out of order.

■    -51 Cannot create the specified folder.

■    -52 Cannot access the specified file or folder.

■    -53 Invalid option selected.

■    The IMISinstall.txt file contains a detailed installation log for general iMIS installation troubleshooting. Whenever data is read from the answer file used in a silent installation, you will see a message in this log like:

12:02:58 | SilentReadData section: asiDatabaseInfo-0 key: sgSQLServer

12:02:58 |      found  sgSQLServer:  MYMACHINEHOST\SQL2005CS

The preceding example shows that the iMIS Installer silently read and set the value of sgSQLServer to MYMACHINEHOST\SQL2005CS

■    If a silent installation fails, the last information in this log will typically be an error message followed by an abort. The error message should help you isolate what went wrong during a silent installation.

12:02:58 | bad db date in silent mode..aborting

12:02:58 | OnAbort called